package com.pat.miniloyalty;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Simple class for logging 
 * 
 * @author Aleksej V.
 *
 */
public class Logist
{

	private final static Logger m_logger = Logger.getLogger("com.pat.miniloyalty.main");
	
	/**
	 * Logs info message
	 * @param who who is logging 
	 * @param msg string to log
	 */
	public static void log(String who, String msg)
	{
		log(who, msg, Level.INFO);
	}

	/**
	 * Logs message with required logging level
	 * @param who who is logging 
	 * @param msg string to log
	 * @param lvl importance of message
	 */
	public static void log(String who, String msg, Level lvl)
	{
		m_logger.log(lvl, "[" + who + "] " + msg);
	}
}
